Skip to content

[Relax][Frontend][ONNX] Support dynamic Range bounds - #20109

Open
napronald wants to merge 1 commit into
apache:mainfrom
napronald:relax-onnx-dynamic-range
Open

[Relax][Frontend][ONNX] Support dynamic Range bounds#20109
napronald wants to merge 1 commit into
apache:mainfrom
napronald:relax-onnx-dynamic-range

Conversation

@napronald

Copy link
Copy Markdown
Contributor

Fixes #20064.

This updates ONNX Range lowering to support runtime scalar bounds, following the same strategy used by Relax TFLite dynamic RANGE lowering. The strategy is to compute the output length in graph, lift it to a symbolic dimension, and rebuild the range as arange(0, length) * delta + start.

The existing constant path is preserved, and symbolic PrimExpr bounds continue to use relax.op.arange directly. Tests are added for constant Range, parametrized dynamic scalar Range inputs, and symbolic PrimExpr limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Relax][ONNX] Range._impl_v12 rejects runtime Call for limit argument

1 participant